<template>
	<view class="my-search-container" @click="searchBoxHandler">
		<view class="my-search-box">
			<!-- 使 uni-ui 提供的写标组件 -->
			<uni-icons type="search" size="17" color='#6d6d6d'></uni-icons>
			<text class="placeholder">搜索商品</text>
		</view>
	</view>
</template>

<script setup>
	const emit = defineEmits(['click'])
	const searchBoxHandler = () => {
		emit('click', 111)
	}
</script>

<style lang="scss" scoped>
	.my-search-container {
		height: 100rpx;
		background-color: #ffffff;
		display: flex;
		align-items: center;
		padding: 0 20rpx;

		.my-search-box {
			height: 70rpx;
			background-color: #f7f7f7;
			border-radius: 25rpx;
			width: 100%;
			display: flex;
			justify-content: center;
			align-items: center;

			.placeholder {
				color: #6d6d6d;
				font-size: 32rpx;
				margin-left: 10rpx;
			}
		}
	}
</style>